package code._13io.charstream._03transfer;

import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;

public class Demo3 {
    public static void main(String[] args) throws IOException {
        InputStreamReader in = new InputStreamReader(new FileInputStream("fileTest\\a.txt"));
        int readData = in.read();
        System.out.println("(readData) = " +(char) (readData));

        char[] chars = new char[1024];
        int readCount = in.read(chars);
        String s = new String(chars, 0, readCount);
        System.out.println("s = " + s);

        in.close();
    }
}
